<%@ page language="java" errorPage="/WEB-INF/common/exception.jsp" pageEncoding="UTF-8" contentType="text/html; charset=UTF-8" %>
<%@ include file="/WEB-INF/common/taglibs.jsp"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>教师管理</title>
<script type="text/javascript" language="javascript" src="<c:url value='/js/ckeditor/ckeditor.js' />" charset=utf-8></script>
<script type="text/javascript">
</script>
</head>
<body>
<div class="main">
    <div class="subTitle">
        <h2><strong>教师管理</strong></h2>
    </div>
	<h3 class="subBoxTitle mT5"><c:if test="${empty id}">添&nbsp;&nbsp;&nbsp;&nbsp;加</c:if><c:if test="${not empty id}">修&nbsp;&nbsp;&nbsp;&nbsp;改</c:if></h3>
<form name="form1" action="<c:url value='/admin/basic/teacher/save.jhtml' />" method="post" onsubmit="return Validator.Validate(this,3);" enctype="multipart/form-data">
	<div class="ntable_mid mT10" >
        <table width="100%" class="nt_table">
			<tr>
                <td width="80" class="gray" height="40" align="right" ><font color="red">*</font>身份证号：</td>
                <td><input name="vo.idcard" type="text" class="ntext_01" value="${vo.idcard }" size="35" dataType="IdCard" msg="请输入身份证号" /></td>
                <td width="80" class="gray" height="40" align="right" ><font color="red">*</font>编号：</td>
                <td><input name="vo.code" type="text" class="ntext_01" value="${vo.code }" size="35" disabled="disabled" /></td>
                <td width="80" class="gray" height="40" align="right" ><font color="red">*</font>姓名：</td>
                <td><input name="vo.name" type="text" class="ntext_01" value="${vo.name }" size="35" dataType="Require" msg="请输入姓名" /></td>
			</tr>
			<tr>
                <td class="gray" height="40" align="right" ><font color="red">*</font>性别：</td>
                <td>
                	<select name="vo.sex"  dataType="Require" msg="请选择性别">
                		<option value="" <c:if test="${empty vo.sex}">selected="selected"</c:if>>---请选择---</option>
	                	<c:forEach var="sex" items="${sexes}">
	                		<option value="${sex }" <c:if test="${vo.sex==sex}">selected="selected"</c:if>>${sex.text }</option>
	                	</c:forEach>
                	</select>
                </td>
                <td class="gray" height="40" align="right" ><font color="red">*</font>部门：</td>
                <td>
                	<select name="vo.depart.id"  dataType="Require" msg="请选择部门">
                		<option value="" <c:if test="${empty vo.depart.id}">selected="selected"</c:if>>---请选择---</option>
	                	<c:forEach var="depart" items="${departs}">
	                		<option value="${depart.id }" <c:if test="${vo.depart.id==depart.id}">selected="selected"</c:if>>${depart.name }</option>
	                	</c:forEach>
                	</select>
                </td>
                <td class="gray" height="40" align="right" ><font color="red">*</font>职务：</td>
                <td>
                	<select name="vo.duty.id"  dataType="Require" msg="请选择职务">
                		<option value="" <c:if test="${empty vo.duty.id}">selected="selected"</c:if>>---请选择---</option>
	                	<c:forEach var="duty" items="${duties}">
	                		<option value="${duty.id }" <c:if test="${vo.duty.id==duty.id}">selected="selected"</c:if>>${duty.name }</option>
	                	</c:forEach>
                	</select>
                </td>
            </tr>
			<tr>
                <td width="80" class="gray" height="40" align="right" >电话：</td>
                <td><input name="vo.phone" type="text" class="ntext_01" value="${vo.phone }" size="35" maxlength="20" require="false" dataType="Phone" msg="电话格式不正确" /></td>
                <td width="80" class="gray" height="40" align="right" >手机：</td>
                <td><input name="vo.mobile" type="text" class="ntext_01" value="${vo.mobile }" size="35" maxlength="11" require="false" dataType="Mobile" msg="手机格式不正确" /></td>
                <td width="80" class="gray" height="40" align="right" >邮箱：</td>
                <td><input name="vo.email" type="text" class="ntext_01" value="${vo.email }" size="35" maxlength="50" require="false" dataType="Email" msg="手机格式不正确" /></td>
			</tr>
			<tr>
                <td width="80" class="gray" height="40" align="right" >邮编：</td>
                <td><input name="vo.postcode" type="text" class="ntext_01" value="${vo.postcode }" size="35" require="false" dataType="Zip" msg="邮政编码格式不正确" /></td>
                <td width="80" class="gray" height="40" align="right" >地址：</td>
                <td colspan="3"><input name="vo.address" type="text" class="ntext_01" value="${vo.address }" size="35" maxlength="100" /></td>
			</tr>
			<tr>
				<td width="80" class="gray" height="40" align="right" >QQ：</td>
                <td><input name="vo.qq" type="text" class="ntext_01" value="${vo.qq }" size="35" require="false" dataType="QQ" msg="QQ格式不正确" /></td>
                <td class="gray" height="40" align="right" >图片：</td>
                <td colspan="3">
                <input name="uploadImage" type="file" />
                <c:if test="${not empty sysAccess}">
                	<img alt="新闻图片" src="<c:url value='${sysAccess.path }' />" width="30" height="30" />
                </c:if>
                </td>
            </tr>
			<tr>
                <td class="gray" height="40" align="right" >内容：</td>
                <td colspan="5">
                	<textarea id="caption" name="vo.caption" rows="9" cols="100">${vo.caption }</textarea>
                	<script type="text/javascript">
					var _extraHeight=480;
					CKEDITOR.replace("caption", {
						toolbar : 'Simple',
						height : 480,
						kt_image : {
							uploadURL : "<c:url value='/ckeditor-upload/descImage.jhtml'/>",
							fileName  : "descImage"
						}
					});
					</script>
                </td>
            </tr>
        </table>
    </div>
    
	<div class="nbot_control mT10">
		<input type="hidden" name="vo.id" value="${id}" />
        <input id="save" type="submit" class="formBtn01" value="保 存" />&nbsp;&nbsp;&nbsp;&nbsp;
		<input id="back" type="button" class="formBtn02" value="返 回"  onclick="location.href='<c:url value='/admin/basic/teacher/index.jhtml' />';" />
    </div>
</form>
</div>
</body>
</html>

